<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    div{
        display: flex;
        width: 800px;
        height: 400px;
        background-color: pink;
        /* 换行 */
        flex-wrap: wrap;
        /* 因为有了换行，此时侧轴上控制子元素的对齐方式用align-content */
        align-content: flex-start;
    }
    div span {
        width: 150px;
        height: 100px;
        background-color: purple;
        color: #ffffff;
        margin: 10px;
    }
</style>
<body>
    <div>
        <span>1</span>
        <span>1</span>
        <span>1</span>
        <span>1</span>
        <span>1</span>
        <span>1</span>
    </div>
</body>
</html>